
package com.zsrt.day20170420.ch01;



import org.junit.Test;

public class StringTest {
	
	@Test
	public void tets01() throws Exception {
		
		String a = new String("aa");
		String b = "aa";
		//false
		System.out.println(a==b);
		
	}
	
	/**
	 * 只有这种情况 a==b
	 * @throws Exception
	 */
	@Test
	public void tets02() throws Exception {
		
		String a = "aa";
		String b = "aa";
		//true
		System.out.println(a==b);
		
	}

	@Test
	public void test03() throws Exception {
		String[] array = new String[3];
		
		array[0] = "abc";
		array[1] = "bcd";
		array[2] = "def";
		
		for(int index=0;index<array.length;index++){
			System.out.println(array[index]);
		}
		
		System.out.println("==========反转========");
		
		
	}
}
